package com.flashcash.solu.view.certification;

import android.content.Context;
import android.content.Intent;

import com.flashcash.solu.R;
import com.flashcash.solu.app.base.BaseActivity;
import com.flashcash.solu.view.fragment.FacebookAccountFragment;
import com.flashcash.solu.view.presenter.Facebook2ActPreImp;
import com.flashcash.solu.view.presenter.Facebook2ActPresenter;

import cn.fraudmetrix.octopus.aspirit.bean.OctopusParam;

public class FacebookAccountActivity extends BaseActivity<Facebook2ActPresenter> {

    private static final String KEY_FROM_MAIN_ACTIVITY = "from_main_activity";

    private OctopusParam param;

    /*@BindView(R.id.fragment_account_facebook_yes)
    ImageView mIvFacebookYes;
    @BindView(R.id.fragment_account_lazada_yes)
    ImageView mIvLazadaYes;*/
    /*@BindView(R.id.id_imagebutton_lazada)
    ImageView mIvRightIconLazada;*/

    /*@BindView(R.id.id_imagebutton_info_list)
    ImageView mIvRightIcon;
    @BindView(R.id.id_textview_title)
    TextView mIdTextviewTitle;
    @BindView(R.id.btn_continue)
    LocalButton mBtnContinue;*/

    private boolean fromMainActivity;//从MainActivity跳转过来

    public static void startFacebookAccountActivity(Context context, boolean fromMainActivity) {
        Intent intent = new Intent(context, FacebookAccountActivity.class);
        intent.putExtra(KEY_FROM_MAIN_ACTIVITY, fromMainActivity);
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_facebook_account;
    }

    @Override
    protected void init() {
        if (getIntent() != null) {
            fromMainActivity = getIntent().getBooleanExtra(KEY_FROM_MAIN_ACTIVITY, false);
        }
        getSupportFragmentManager().beginTransaction().replace(R.id.container, FacebookAccountFragment.newInstance(fromMainActivity)).commitAllowingStateLoss();
    }

    @Override
    protected Facebook2ActPresenter initPresenterImpl() {
        return new Facebook2ActPreImp();
    }

}
